<me:UIGAAUF
    x:Class="WPFExcelReport.YARNA"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
     xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
     xmlns:me="clr-namespace:WPFExcelReport" 
    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
     xmlns:PR="clr-namespace:WPFExcelReport;assembly=TICC_PRULES"  
     xmlns:YB="clr-namespace:WPFExcelReport;assembly=TGASTGA" 
    x:Name="TV"
    Loaded="Window_Loaded"
 >
    <me:UIGAAUF.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:TextTrimmingConverter  x:Key="trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIGAAUF.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <WrapPanel Grid.Row="0">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock  Grid.Column="0"  Height="Auto"   Width="Auto"  Margin="0,0,0,0" Text="{Binding Source={Localization:Translate Word=库存}}"  VerticalAlignment="Center" />
            </Grid>
            <SD:K0100 LMS="J;N;" IsEdit="True" 
                      KEY="{Binding LMMU,ElementName=TV}"/>
        </WrapPanel>
        <DataGrid Grid.Row="1" Grid.Column="0" 
              Margin="0,1,0,0"  
              FontSize="14"
              CanUserReorderColumns="True"  
              CanUserResizeRows="True" CanUserSortColumns="True"  
              AutoGenerateColumns="False"  
              EnableRowVirtualization="True"  
              VerticalScrollBarVisibility="Auto"
              RowDetailsVisibilityMode="VisibleWhenSelected"  VerticalAlignment="Top"
               IsSynchronizedWithCurrentItem="True"
               Opacity="10" Visibility="Visible"
               Name="dlgMaster"  
                IsReadOnly="True" 
               ItemsSource="{Binding Source={StaticResource vwMaster}}" 
              >
            <DataGrid.Columns>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=产地}}" Binding="{Binding GAVAR}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=色号}}" Binding="{Binding GAFARBE,Converter={StaticResource ResourceKey=gb2312}}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=纺批}}" Binding="{Binding GPSPPART,Converter={StaticResource ResourceKey=gb2312}}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=染批}}" Binding="{Binding GPFBPART,Converter={StaticResource ResourceKey=gb2312}}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=类型}}" Binding="{Binding GLAUFMSL}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=库}}" Binding="{Binding LO}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=区}}" Binding="{Binding LB}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=区}}" Binding="{Binding LP}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=库存}}" Binding="{Binding Path=NETKG}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=留位}}" Binding="{Binding Path=QLOCK}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=预扣}}" Binding="{Binding Path=QPLAN}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=自由}}" Binding="{Binding Path=QFREE}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid>
        <WrapPanel Grid.Row="2">
            <TextBlock Text="{Binding Source={Localization:Translate Word=可用:}}"  Margin="20,0,0,0"></TextBlock>
            <TextBlock Text="{Binding SUM1, Converter={StaticResource d1000}}" Foreground="Red" Margin="20,0,0,20"></TextBlock>
            <TextBlock Text="{Binding Source={Localization:Translate Word=吨}}"  Margin="20,0,0,0"></TextBlock>
            <TextBlock Text="{Binding Source={Localization:Translate Word=批数:}}"  Margin="20,0,0,0"></TextBlock>
            <TextBlock Text="{Binding Counts}" Foreground="Red" Margin="20,0,0,0"></TextBlock>
        </WrapPanel>
    </Grid>
</me:UIGAAUF>
